/**
 * Collaborative Story Development Web Application (CSDApp) 
 * Copyright Anton Strack 2014
 *
 * This file is part of Collaborative Story Development Application (CSDApp).
 *
 * CSDApp is free software: you can redistribute it and/or modify it under the
 * terms of the GNU General Public License as published by the Free Software
 * Foundation, either version 3 of the License, or any later version.
 *
 * CSDApp is distributed in the hope that it will be useful, but WITHOUT ANY
 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
 * A PARTICULAR PURPOSE. See the GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License along with
 * CSDApp. If not, see <http://www.gnu.org/licenses/>.
 *
 */
package csdwa;

/**
 * This interface defines the basic validator requires for the csdwa
 * application.
 *
 * @author Anton Strack
 */
public interface CsdwaValidator {

    /**
     * Get the generic error message for this validator.
     *
     * @param validatorValueDisplayName the name of the value to display to an
     * end user when there is an error. For instance Email for an email
     * ValidatorValue object.
     * @return The error message of the validator
     */
    public String getErrorMessage(String validatorValueDisplayName);

    /**
     * Check an object value if it is valid.
     *
     * @param value the value to validate against
     * @return true if the value is valid, false otherwise.
     */
    public boolean isValid(Object value);

    /**
     * @return the name
     */
    public String getName();
}
